from django.db import models
from django.contrib.auth.models import User
from eqportal.profile.models import *

class Guild(models.Model):
    name = models.CharField(max_length = 200)

class Location(models.Model):
    name = models.CharField(max_length = 200)

class Quest(models.Model):
    name = models.CharField(max_length = 200)
    type = models.CharField(max_length = 200, null = True)
    level = models.IntegerField(null = True)
    descr = models.TextField(null = True)    
    locations = models.ManyToManyField(Location)

class UserInfo(models.Model):
    guild = models.ForeignKey(Guild)
    user = models.ForeignKey(User, unique = True)

class QuestRequest(models.Model):
    quest = models.ForeignKey(Quest)
    user = models.ForeignKey(User)
    text = models.CharField(max_length = 200, null = True)


# Create your models here.
